﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Invoicing.sys
{
    public partial class Userinfo : Pubs.PageHandle
    {

        private string _userName;

        public string UserName
        {
            get { return _userName; }
            set { _userName = value; }
        }

        protected void Page_Load(object sender, EventArgs e)
        {

            if (!IsPostBack)
            {
                //得到当前页的页码
                if (Request["pageNum"] != null)
                {
                    CurrentPageindex = int.Parse(Request["pageNum"].ToString());
                }
                DeptInfoBand();
            }

        }


        void DeptInfoBand()
        {

            string content = " 1=1 ";

            if (Request["pageNum"] != null)
            {
                CurrentPageindex = int.Parse(Request["pageNum"].ToString());
            }

            if (Request["UserName"] != null && Request["UserName"] != "")
            {
                content += " and u_trueName like'%" + Request["UserName"] + "%' ";

                UserName = Request["UserName"].ToString();
            }

            ZY.BLL.View_Tab_Userinfo dall = new ZY.BLL.View_Tab_Userinfo();
            TotalCount = dall.GetRecordCount(content);
            DataSet ds = dall.GetListByPage(content, "uid desc  ", (CurrentPageindex - 1) * NumPerPage + 1, ((CurrentPageindex - 1) * NumPerPage) + NumPerPage);
            DeptList.DataSource = ds;
            DeptList.DataBind();



        }



    }
}